function Invoke-ReverseIntegration {
<#
.SYNOPSIS
Syncs all changes made in the master branch of the git repo into the TFS partial branch and then merges them into the Volatile workspace. It DOES NOT perform a commit.

.DESCRIPTION
This function performs the following operations:
 - TF undo . /r from the Volatile workspace removing any pending changes (there should not be any since this is not where you work.)
 - TF GET from the Volatile workspace
 - TF undo . /r from the Partial Branch workspace removing any pending changes (there should not be any since this is not where you work.)
 - TF GET from the Partial Branch workspace
 - stashes any pending changes in git repo
 - checks out master git branch
 - git-tf checkin --shallow -m="$message"
 - TF Merge /r <Partial Branch> <Volatile Server Branch>

.PARAMETER Message
Commit Message used when checking in to TFS

.LINK
https://BigGit.Codeplex.com
Add-VolitileEnlistment
Add-NonVolitileEnlistment
Add-PartialBranch
Add-PartialBranchGitClone
Invoke-ForwardIntegration
#>   
    param(
        [Parameter(Mandatory=$true)]
        [string] $message
    )
    $currentDir = Resolve-Path .
    cd (Get-BigGitConfig VolatilePath)
    Write-BigGitMessage "Undoing pending changes in Source branch workspace" -backgroundColor darkgreen
    Invoke-TF undo . /r /noprompt
    Write-BigGitMessage "getting latest for source workspace" -backgroundColor darkgreen
    Invoke-TF get
    cd (Get-BigGitConfig PartialPath)
    Write-BigGitMessage "Undoing pending changes in partial branch workspace" -backgroundColor darkgreen
    Invoke-TF undo . /r /noprompt
    Write-BigGitMessage "Checking in git master to TFS Partial Branch" -backgroundColor darkgreen
    cd (Get-BigGitConfig GitRepoPath)
    git stash
    git checkout master
    git-tf checkin --shallow -m="$message"
    cd (Get-BigGitConfig PartialPath)
    Write-BigGitMessage "getting latest for partial branch workspace" -backgroundColor darkgreen
    Invoke-TF get
    cd (Get-BigGitConfig VolatilePath)
    Write-BigGitMessage "Reverse integrating partial branch workspace into original branch" -backgroundColor darkgreen
    Invoke-TF merge /r (Get-BigGitConfig PartialBranch) (Get-BigGitConfig SourceBranch) 
}